1. Technical Field
This disclosure relates generally to identifying elements of a web page in a data processing system and more specifically to tracking JavaScript actions in a rich Internet application in the data processing system.
2. Description of the Related Art
XPath is a widely used solution to a problem of uniquely identifying a hypertext markup language (HTML) element in a document object model (DOM). The XPath works well when the HTML content of a particular page is static. However, when the HTML content of the particular page is dynamic, or the page is visited on two different times, for example, the same page at two different timestamps, uniquely tracking an HTML element in the page becomes impossible using XPath because of high probability the XPath is no longer valid.
Validity is questionable because as a new element is introduced in the DOM, elements in the DOM are re-shuffled, and elements in the DOM are deleted. JavaScript actions are associated with HTML elements. The inability to uniquely identify HTML nodes in time (two different timestamps) prevents applications from also uniquely identifying associated JavaScript actions in time (two different timestamps).
In essence, a problem arises in an inability to uniquely map JavaScript actions from one DOM to a different DOM, to enable a crawler to determine JavaScript actions common between the two DOMs, and therefore which actions are new and which actions have been deleted.
Monitoring JavaScript actions on the particular page is required to enable automatic identification of portions of the particular page previously explored in contrast with other portions. For rich Internet applications (RIA) and Web 2.0 applications the particular problem is even more common, due to JavaScript actions executed on the page, and due to the actions typically causing a change in portions of the page. For example, sorting a table, moving/minimizing/maximizing portlets, adding an item in a shopping cart, or automatically updating news on a newspaper website all of which lead to changes on the page. A respective DOM experiences common modifications that are an intrinsic characteristic of dynamic web applications, including RIA and Web 2.0 applications in which typical modifications comprise deletion of one or more DOM elements, addition of one or more DOM elements, a move of one or more DOM elements or sorting of DOM elements.